<form>
	<div class="x-list-title">
	<table width="100%" border="0" height="100%">
		<tr>
			<td align="left">
				<h2>Nhóm người dùng</h2>	
			</td>
			<td align="right">	
				<div class="x-list-options">
				<a href="#Admin/Group/Add" class="x-button x-button-add">Nhóm mới</a>
				</div>
			</td>
		</tr>
	</table>	
	</div>
	<table width="100%" cellpadding="5" class="x-list" >
		<tr>
			<th align="center" width="25">TT</th>
			<th>
				<?php show_order_link('Tên nhóm','title','#Admin/Group',$vars) ;?>
			</th>
			<th width="150">
				<?php show_order_link('Ngày tạo','date_created','#Admin/Group',$vars) ;?>
			</th>
			<th width="150">
				<?php show_order_link('Người tạo','username','#Admin/Group',$vars) ;?>
			</th>
			<th width="40" colspan="2">Tác vụ</th>
		</tr>
		<?php $posts = $this->get('posts');?>
		<?php if( count( $posts) == 0 ):?>
			<tr><td colspan='7' class="page">
				<div class="x-page">Chưa có nhóm nào được tạo.</div>
			</td></tr>
		<?php else:?>
		<?php foreach( $posts as $k=> $a ):?>
			<tr>
				<td align="center" width="25"><?php echo $k+1;?></td>
				<td>
					<a><?php _e($a['title'])?></a>
				</td>
				<td align="center"><?php _e(show_date(DATE_FORMAT,$a['date_created']));?></td>
				<td align="center"><a href="#Personnel/Index/View?ID=<?php _e( $a['user_id'])?>"><?php echo $a['username']?></a></td>
				
				<td width="25" align="center">
					<a href="#Admin/Group/edit?ID=<?php _e($a['ID']);?>" class="x-edit"></a>
				</td>
				<td width="25" align="center">
					<a onclick="module_delete('<?php _baseUrl();?>/Admin/Group/Delete?ID=<?php _e($a['ID']);?>')" class="x-delete"></a>
				</td>
			</tr>
		<?php endforeach;?>
		<tr>
		<td colspan="6" class="page">
			<div class="x-page">
				<?php $this->e("page");?>
			</div>		
		</td>
		<?php endif;?>
	</tr>
	</table>	
</form>
